﻿<%@ Page Language="C#" MasterPageFile="~/Template/Site_Main.Master" AutoEventWireup="true" CodeBehind="sys_set.aspx.cs"
    Inherits="RegisterationSystem.Space_Education.sys_set" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(function () {
            $('#StopDateTime').datetimebox({
                required: true,
                showSeconds: true,
                editable: false
            });
            $.post(location.href, { "action": "InitSet" }, function (data) {
                if (data == "") {
                    return;
                }
//                alert(data);
                var str = new Array();
                str = data.split("|");
                if (str[0].toString().toLowerCase() == "false") {
                    $("#IsStopSign").attr("checked", false);
                } else {
                    $("#IsStopSign").attr("checked", true);
                }
                $("#StopDateTime").datetimebox("setValue", str[1]);
            });
        });
        function SetSystem() {
//            alert(document.getElementById("IsStopSign").checked);
//            alert($("#StopDateTime").datetimebox("getValue"));
            $.post(location.href, { "action": "SetSystem", "IsStop": document.getElementById("IsStopSign").checked, "StopTime": $("#StopDateTime").datetimebox("getValue") }, function (data) {
                if (data == "ok") {
                    alert("设置成功！");
                }
                else {
                    alert("设置失败！");
                }
            });
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Place_Local" runat="server">
    <div class="localTitle">
        <a>系统信息设置</a>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="loadheight">
        <table width="100%%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td bgcolor="#FFFFFF">
                    <table width="100%%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td>
                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                </table>
                            </td>
                        </tr>
                    </table>
                    <table width="100%%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td class="cen_R_dh">
                                <strong>系统信息设置</strong>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <table width="100%" border="0" cellpadding="0" cellspacing="1">
                                    <tr>
                                        <td height="20">
                                            <table width="100%%" border="0" cellspacing="0" cellpadding="3">
                                            </table>
                                            <div style="margin-top: 5px">
                                            </div>
                                            <table width="688" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
                                                <tr>
                                                    <td width="100" height="20" align="center" bgcolor="#FFFFFF">
                                                        是否终止登记
                                                    </td>
                                                    <td width="200" bgcolor="#FFFFFF">
                                                        <input type="checkbox" id="IsStopSign" style="border: none" />
                                                    </td>
                                                    <td width="100" align="center" bgcolor="#FFFFFF">
                                                        截止登记时间
                                                    </td>
                                                    <td align="left" bgcolor="#FFFFFF">
                                                        <input id="StopDateTime" type="text" style="width: 180px;" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                    <div style="margin-top: 5px">
                    </div>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="200">
                                &nbsp;
                            </td>
                            <td>
                                <input type="button" name="button" id="button" value="确定" class="anniu" width="73"
                                    height="27" onclick="SetSystem();" />
                            </td>
                        </tr>
                    </table>
                    <div style="height: 5px;">
                    </div>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
